<div class="refentry" lang="en" xml:lang="en"><a id="glIsEnabled"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glIsEnabled, glIsEnabledi — test whether a capability is enabled</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><p><code class="funcdef">GLboolean <b class="fsfunc">glIsEnabled</b>(</code>GLenum <var class="pdparam">cap</var><code>)</code>;</p></div><div class="funcsynopsis"><table><tr><td><code class="funcdef">GLboolean <b class="fsfunc">glIsEnabledi</b>(</code></td><td>GLenum  </td><td><var class="pdparam">cap</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">index</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>cap</code></em></span></dt><dd><p>
                    Specifies a symbolic constant indicating a GL capability.
                </p></dd><dt><span class="term"><em class="parameter"><code>index</code></em></span></dt><dd><p>
                    Specifies the index of the capability.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glIsEnabled</code> returns <code class="constant">GL_TRUE</code> if <em class="parameter"><code>cap</code></em> is an enabled capability
            and returns <code class="constant">GL_FALSE</code> otherwise. Boolean states that are indexed may be tested with <code class="function">glIsEnabledi</code>.
            For <code class="function">glIsEnabledi</code>, <em class="parameter"><code>index</code></em> specifies the index of the capability to test. <em class="parameter"><code>index</code></em>
            must be between zero and the count of indexed capabilities for <em class="parameter"><code>cap</code></em>.
            Initially all capabilities except <code class="constant">GL_DITHER</code> are disabled;
            <code class="constant">GL_DITHER</code> is initially enabled.
        </p><p>
            The following capabilities are accepted for <em class="parameter"><code>cap</code></em>:
        </p><p>
        </p><div class="informaltable"><table><colgroup><col /><col /></colgroup><thead><tr><th><span class="bold"><strong>
                        Constant
                        </strong></span></th><th><span class="bold"><strong>
                        See
                        </strong></span></th></tr></thead><tbody><tr><td>
                        <code class="constant">GL_BLEND</code>
                        </td><td>
                        <a href="glBlendFunc"><span class="citerefentry"><span class="refentrytitle">glBlendFunc</span></span></a>, <a href="glLogicOp"><span class="citerefentry"><span class="refentrytitle">glLogicOp</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_CLIP_DISTANCE</code><span class="emphasis"><em>i</em></span>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_COLOR_LOGIC_OP</code>
                        </td><td>
                        <a href="glLogicOp"><span class="citerefentry"><span class="refentrytitle">glLogicOp</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_CULL_FACE</code>
                        </td><td>
                        <a href="glCullFace"><span class="citerefentry"><span class="refentrytitle">glCullFace</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_DEPTH_CLAMP</code>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_DEPTH_TEST</code>
                        </td><td>
                        <a href="glDepthFunc"><span class="citerefentry"><span class="refentrytitle">glDepthFunc</span></span></a>, <a href="glDepthRange"><span class="citerefentry"><span class="refentrytitle">glDepthRange</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_DITHER</code>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_FRAMEBUFFER_SRGB</code>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_LINE_SMOOTH</code>
                        </td><td>
                        <a href="glLineWidth"><span class="citerefentry"><span class="refentrytitle">glLineWidth</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_MULTISAMPLE</code>
                        </td><td>
                        <a href="glSampleCoverage"><span class="citerefentry"><span class="refentrytitle">glSampleCoverage</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_POLYGON_SMOOTH</code>
                        </td><td>
                        <a href="glPolygonMode"><span class="citerefentry"><span class="refentrytitle">glPolygonMode</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_POLYGON_OFFSET_FILL</code>
                        </td><td>
                        <a href="glPolygonOffset"><span class="citerefentry"><span class="refentrytitle">glPolygonOffset</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_POLYGON_OFFSET_LINE</code>
                        </td><td>
                        <a href="glPolygonOffset"><span class="citerefentry"><span class="refentrytitle">glPolygonOffset</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_POLYGON_OFFSET_POINT</code>
                        </td><td>
                        <a href="glPolygonOffset"><span class="citerefentry"><span class="refentrytitle">glPolygonOffset</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_PROGRAM_POINT_SIZE</code>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_PRIMITIVE_RESTART</code>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>, <a href="glPrimitiveRestartIndex"><span class="citerefentry"><span class="refentrytitle">glPrimitiveRestartIndex</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_SAMPLE_ALPHA_TO_COVERAGE</code>
                        </td><td>
                        <a href="glSampleCoverage"><span class="citerefentry"><span class="refentrytitle">glSampleCoverage</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_SAMPLE_ALPHA_TO_ONE</code>
                        </td><td>
                        <a href="glSampleCoverage"><span class="citerefentry"><span class="refentrytitle">glSampleCoverage</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_SAMPLE_COVERAGE</code>
                        </td><td>
                        <a href="glSampleCoverage"><span class="citerefentry"><span class="refentrytitle">glSampleCoverage</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_SAMPLE_MASK</code>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_SCISSOR_TEST</code>
                        </td><td>
                        <a href="glScissor"><span class="citerefentry"><span class="refentrytitle">glScissor</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_STENCIL_TEST</code>
                        </td><td>
                        <a href="glStencilFunc"><span class="citerefentry"><span class="refentrytitle">glStencilFunc</span></span></a>, <a href="glStencilOp"><span class="citerefentry"><span class="refentrytitle">glStencilOp</span></span></a>
                        </td></tr><tr><td>
                        <code class="constant">GL_TEXTURE_CUBE_MAP_SEAMLESS</code>
                        </td><td>
                        <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
                        </td></tr></tbody></table></div><p>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            If an error is generated,
            <code class="function">glIsEnabled</code> and <code class="function">glIsEnabledi</code> return <code class="constant">GL_FALSE</code>.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>cap</code></em> is not an accepted value.
        </p><p>
            <code class="constant">GL_INVALID_VALUE</code> is generated by <code class="function">glIsEnabledi</code> if <em class="parameter"><code>index</code></em> is outside the
            valid range for the indexed state <em class="parameter"><code>cap</code></em>.
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>,
            <a href="glDisable"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a>,
            <a href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. Copyright © 2010-2011
            Khronos Group. This document is licensed under the SGI
            Free Software B License. For details, see
            <a href="https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/" target="_top">https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
